# -*- coding: utf-8 -*-
all = [
    'auth_only',
    'not_auth',
]
def not_auth( func ):
  def wrapper( *args, **kwards ):
      req = args[0]
      if not req.session['user_auth']:
          return func( *args, **kwards )
  return wrapper


def auth_only( func ):
  def wrapper( *args, **kwards ):
      req = args[0]
      if req.session['user_auth']:
          return func( *args, **kwards )

  return wrapper
